home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Data 2002 May / CD Rom Data Mayıs 2002.iso / Freeware / Blitz Basic / data1.cab / Support / help / beginners / tutorial / doublebuffering.bb < prev    next >
Encoding:
Text File  |  2002-04-10  |  755 b   |  27 lines

  1. ; Example of double bufferiing
  2. ; An easy to use and important feature in Blitz
  3. ; for more examples visit www.blitzbasic.com
  4. ; or visit http://users.breathemail.net/georgebray
  5.  
  6. Graphics 640,480 ; goes into graphics mode & sets the resolution
  7. Text 50,50,"Press spacebar..."
  8.  
  9. SetBuffer FrontBuffer() ; draw to the front buffer
  10. Text 0,0,"This drawn to the front buffer"
  11.  
  12. Text 50,100,"Press ecape to exit."
  13. SetBuffer BackBuffer() ; draw to the back buffer
  14.  
  15. Text 50,50,"Press spacebar again..."
  16. Text 0,0,"This drawn to the back buffer"
  17. Text 50,100,"Press ecape to exit."
  18.  
  19. While Not KeyDown(1) ;keep looping until ESC pressed
  20.  
  21.  
  22.     WaitKey ;wait for any keypress
  23.     
  24.  
  25.     Flip ;swap front and back buffers
  26.     
  27. Wend ; continue until progrgram ends